package org.colcon.web.model.vote;

import java.util.HashMap;
import java.util.Map;

import org.colcon.web.model.Vote;
import org.colcon.web.model.framework.IBallot;

public class NominationVote extends Vote 
{
	public String getType(){return "nomination_vote";}
	
	private static final long serialVersionUID = -5987191647847593841L;

	public NominationVote()
	{
		this(new HashMap<String, String>());
	}
	
	public NominationVote(Map<String, String> args)
	{
		this(
				args.get(PARENT), 
				args.get(ID), 
				args.get(TEXT),
				args.get(COMMAND), 
				args.get(CHILDREN)
		);
	}
	
	public NominationVote(String parent, String id, String text, String command, String children)
	{
		super(parent, id, text, command, null);
	}
	
	public String getValue(IBallot[] ballots)
	{
		String str = "";
		
		for(IBallot ballot : ballots)
			str += ballot.getValue() + " ";
		
		return str;
	}
}
